package com.xindaoapp.happypet.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.xindaoapp.happypet.R;

/**
 * 消息列表
 * 
 * @author
 * 
 */
public class MessageListActivity extends UMBaseActivity implements OnClickListener {
    @ViewInject(R.id.tittle_common_cancel)
    private ImageView tittle_common_cancel;
    @ViewInject(R.id.tittle_common_content)
    private TextView tittle_common_content;

    @ViewInject(R.id.my_order_1)
    private RelativeLayout my_order_1;
    @ViewInject(R.id.my_order_2)
    private RelativeLayout my_order_2;
    @ViewInject(R.id.my_order_3)
    private RelativeLayout my_order_3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_messagelist);
        ViewUtils.inject(this);
        tittle_common_content.setText("我的帖子");
        tittle_common_cancel.setOnClickListener(this);
        my_order_1.setOnClickListener(this);
        my_order_2.setOnClickListener(this);
        my_order_3.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tittle_common_cancel:
                finish();
                break;
            case R.id.my_order_1:
                Intent mymsgA = new Intent(getApplicationContext(), MyPostActivity.class);
                startActivity(mymsgA);
                break;
            case R.id.my_order_2:
                Intent myhfA = new Intent(getApplicationContext(), MyMessageActivity.class);
                startActivity(myhfA);
                break;
            case R.id.my_order_3:
                Intent myscA = new Intent(getApplicationContext(), MyShouCangActivity.class);
                startActivity(myscA);
                break;

            default:
                break;
        }
    }
}
